/**
 * 
 */
package com.geekteam.geometrychess.board;

import com.geekteam.geometrychess.config.BoardConfig;
import com.geekteam.geometrychess.game.ChessBoard;
import com.geekteam.geometrychess.room.RoomBoard;
import com.smartfoxserver.v2.entities.data.SFSObject;

/**
 * @author MtRol
 * 
 */
public class GameBoard {

	private RoomBoard mRoomBoard;
	private ChessBoard mChessBoard;
	private BoardConfig mConfig;
	
	public GameBoard(int id, String name){
		mConfig = new BoardConfig();
		mRoomBoard = new RoomBoard(id, name);
		mChessBoard = new ChessBoard();
	}
	
	public SFSObject getInfoOfBoard(){
		SFSObject object = new SFSObject();
		object = mRoomBoard.getInfoOfBoard();
		object.putInt("timerTotal", mConfig.mTimeTotal);
		object.putInt("timerTurn", mConfig.mTimeTurn);
		object.putDouble("betMoney", mConfig.mBetMoney);
		
		return object;
	}
	
	public SFSObject getJoinRoomObject(){
		SFSObject object = new SFSObject();
		object = getInfoOfBoard();
		if(mRoomBoard.isPlaying()){
			//TODO 
		}
		
		return object;
	}
	
	public RoomBoard getRoomBoard() {
		return mRoomBoard;
	}

	public void setRoomBoard(RoomBoard mRoomBoard) {
		this.mRoomBoard = mRoomBoard;
	}

	public ChessBoard getChessBoard() {
		return mChessBoard;
	}

	public void setChessBoard(ChessBoard mChessBoard) {
		this.mChessBoard = mChessBoard;
	}

	public BoardConfig getConfig() {
		return mConfig;
	}

	public void setConfig(BoardConfig mConfig) {
		this.mConfig = mConfig;
	}
}
